#ifndef TIMER_H_INCLUDED
#define TIMER_H_INCLUDED

#include <SDL.h>

#include "Singleton.h"

class Timer : public Uncopyable
{
public:
	void Update(); // calculates how much time has passed since last frame
	float GetDeltaTime() const; // returns the value and dosnt change anything THUS 'const'
private:
	Timer(); // singleton
	int m_TicksLastFrame;
	float m_DeltaTime;
	friend class Singleton<Timer>; // friend of the singleton of the time class allows the singleton template to access the timer constructor in the private members
};

typedef Singleton<Timer> TheTimer; // applys the singleton pattern to the Timer class, so only 1 will can be made (instance function here from singleton)

#endif